# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-santos10wifi
pkgdesc="Samsung Galaxy Tab 3 10.1 Wi-Fi"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="x86"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-santos10wifi mkbootimg"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-x11
	$pkgname-nonfree-firmware:nonfree_firmware
"

source="deviceinfo
	xorg.conf"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

x11() {
	install_if="$pkgname xorg-server"
	depends="
		xf86-input-libinput
		xf86-video-fbdev"
	install -Dm644 "$srcdir"/xorg.conf \
		"$subpkgdir"/etc/X11/xorg.conf.d/10-santos10wifi.conf
}

nonfree_firmware() {
	pkgdesc="Wi-Fi firmware"
	depends="firmware-samsung-santos10wifi"
	mkdir "$subpkgdir"
}

sha512sums="
0346e85fe618c1e24e164c6fc754bf739c14e736ad3d222e1ddea092777b68d145e35d787ba41fda585145798d76b1713d483964fd27056075ee8d1f6f2d8494  deviceinfo
2511fa519813061531757996fbbbb9eecae1a136d2e13149fd7afe04d19982c7eaa5ced8df57860bb816186f206915fcbd4a9e34fdf92b2c6efe3320a223c328  xorg.conf
"
